using System;
using System.Windows.Forms;
using System.Globalization;


namespace Agron.UI.SmartClient
{
    /// <summary>
    /// Message Box helper class
    /// </summary>
    static class MessageBoxService
    {
        private static readonly MessageBoxOptions _messageBoxOptions = (MessageBoxOptions) 0;

        internal static void ReportError(IWin32Window owner, string format, params object[] args)
        {
            MessageBox.Show(
                owner,
                string.Format(CultureInfo.CurrentCulture, format, args),
                Application.ProductName,
                MessageBoxButtons.OK,
                MessageBoxIcon.Error,
                MessageBoxDefaultButton.Button1,
                _messageBoxOptions);
        }

        internal static void ReportInfo(IWin32Window owner, string format, params object[] args)
        {
            MessageBox.Show(
                owner,
                string.Format(CultureInfo.CurrentCulture, format, args),
                Application.ProductName,
                MessageBoxButtons.OK,
                MessageBoxIcon.Information,
                MessageBoxDefaultButton.Button1,
                _messageBoxOptions);
        }

        internal static DialogResult ReportQuestion(IWin32Window owner, MessageBoxButtons buttons, MessageBoxDefaultButton defaultButton, string format, params object[] args)
        {
            return MessageBox.Show(
                owner,
                string.Format(CultureInfo.CurrentCulture, format, args),
                Application.ProductName,
                buttons,
                MessageBoxIcon.Question,
                defaultButton,
                _messageBoxOptions);
        }
    }
}
